<?php

namespace app\admin\service;

use app\admin\model\Log as Model;
use app\admin\validate\LogValidate as Validate;

class Log extends AdminService
{

	protected function init()
	{
		$this->model = new Model();
		$this->validate = new Validate();
	}

	public function getTableList ( $where = [] )
	{
		$page  = $this->request->request('page/d' , 0);
		$limit = $this->request->request('limit/d' , 0);
		$list  = $this->model->with('adminUser')->where($where)->order('createtime desc')->page($page)->limit($limit)->select();
		return json([
			'code'  => 0 ,
			'data'  => $list ,
			'count' => $this->model->where($where)->count() ,
			'msg'   => ''
		]);
	}

}

